<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Operators</h2>

<p>x = 5, y = 2, calculate z = x + y, and display z:</p>



<script type="text/javascript" src="js/sha1.js"></script>



<script>

function calcHMAC() {

var shaObj = new jsSHA("SHA-1", "TEXT");
shaObj.setHMACKey("dfdfdfdfd", "TEXT");
shaObj.update("clientType=1&clientVersion=1.0.0&rechargeAmount=10000&timpStamp=1477022369066&token=baddreisaaosj434354ra");
var hmac = shaObj.getHMAC("B64");

alert(hmac);

}

calcHMAC();

</script>

</body>
</html>
